import request from '@/utils/request';
import { AxiosPromise } from 'axios';
import { ExaminedataVO, ExaminedataForm, ExaminedataQuery } from '@/api/yuanshidian/examinedata/types';

/**
 * 查询审核列表列表
 * @param query
 * @returns {*}
 */

export const listExaminedata = (query?: ExaminedataQuery): AxiosPromise<ExaminedataVO[]> => {
  return request({
    url: '/yuanshidian/examinedata/list',
    method: 'get',
    params: query
  });
};

/**
 * 查询审核列表详细
 * @param id
 */
export const getExaminedata = (id: string | number): AxiosPromise<ExaminedataVO> => {
  return request({
    url: '/yuanshidian/examinedata/' + id,
    method: 'get'
  });
};

/**
 * 新增审核列表
 * @param data
 */
export const addExaminedata = (data: ExaminedataForm) => {
  return request({
    url: '/yuanshidian/examinedata',
    method: 'post',
    data: data
  });
};

/**
 * 修改审核列表
 * @param data
 */
export const updateExaminedata = (data: ExaminedataForm) => {
  return request({
    url: '/yuanshidian/examinedata',
    method: 'put',
    data: data
  });
};

/**
 * 删除审核列表
 * @param id
 */
export const delExaminedata = (id: string | number | Array<string | number>) => {
  return request({
    url: '/yuanshidian/examinedata/' + id,
    method: 'delete'
  });
};
